package com.project.xsf.service;

import com.project.common.entity.PageVo;
import com.project.xsf.entity.MDesignProcedure;
import com.project.xsf.entity.MDesignProcedureDetails;
import com.project.xsf.entity.MDesignProcedureModule;
import com.project.xy.entity.DFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

public interface MDesignProcedureService {
    //往产品生产工序表表，产品生产工序明细表插数据，产品档案表的工序组成标志改变
    int insertSelective(MDesignProcedure record, List<MDesignProcedureDetails> mDesignProcedureDetailsList,DFile dFile) throws IOException;
    //查询显示的信息为所有已登记待审核的工序组成设计单
    PageVo<MDesignProcedure> queryMDesignProcedure(Map<String,String> map);

    int updateByPrimaryKeySelective(MDesignProcedure record, List<MDesignProcedureDetails> mDesignProcedureDetailsList);

    int updateByPrimaryKeySelective(MDesignProcedure record);

    //查询所有工序组成设计单
    PageVo<MDesignProcedure> queryAllMDesignProcedure(Map<String,String> map);

    //查询通过审核的工序组成设计单
    PageVo<MDesignProcedure> queryGreenMDesignProcedure(Map<String,String> map);

    //修改工序组成设计单信息,并修改状态为未审核，并删除工序物料相关信息，工序物料信息需要重新设计
    int changeProcedure(MDesignProcedure record, List<MDesignProcedureDetails> mDesignProcedureDetailsList);

    //查询未制定工序物料设计或工序物料设计审核未通过的产品工序设计单 并且工序设计单已经完成设计并通过审核
    PageVo<MDesignProcedure> queryMDesignProcedureModule(Map<String,String> map);

    MDesignProcedure selectByPrimaryKey(Integer id);

    MDesignProcedure queryByProductId(String productId);

    PageVo<MDesignProcedure> queryMDesignProcedureModuleNoCheck(Map<String,String> map);

    int deleteByPrimaryKey(Integer id);


    //查询的信息范围为所有已登记的工序物料设计单
    PageVo<MDesignProcedure> queryMDesignProcedureHasDesign(Map<String,String> map);
}
